<template>
  <div class="head">
    <div class="left margin-left">
      <p class="icon" @click="showMenu">
        <img src="@/assets/head/icon-menu.png" alt="#">
      </p>
    </div>
    <img class="logo" src="@/assets/head/logo.png" @click="$router.push('/home')" alt="#">
    <div class="right margin-right">
      <p class="icon" @click="$router.push('/search')">
        <img src="@/assets/head/icon-search.png" alt="#">
      </p>
      <p class="icon">
        <img src="@/assets/head/icon-box.png" alt="#">
      </p>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    showMenu() {
      this.$emit('showMenu')
    }
  }
}
</script>

<style lang="scss" scoped>
.head {
  display: flex;
  height: 50px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #efefef;
  .icon {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #666;
    box-sizing: border-box;
    width: 30px;
    height: 30px;
    img {
      width: 15px;
      height: 15px;
    }
  }
  .logo {
    height: 50px;
  }
  .margin-left {
    margin-left: 20px;
  }
  .margin-right {
    margin-right: 10px;
  }
  .left {
    width: 70px;
  }
  .right {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 70px;
  }
}
</style>